<div class="layui-form-item">
    <label class="layui-form-label">{$value['desc']}</label>
    <div class="layui-input-block" style="width: 30%;">
        <select class="layui-select {$value['class']}" style="{$value['style']}" name="{$value['name']}" lay-filter="" lay-search>
            <option value="">请选择</option>
            {foreach $value['option'] as $va}
            <optgroup label="{$va['name']}">
                {foreach $va['child'] as $key=>$v}
                    {if isset($v['id'])}
                        {if $value['isidtoname']}
                            {if $value['value']==$v['id']}
                                <option value="{$v['id']}" selected>{$v['name']}</option>
                            {else}
                                <option value="{$v['id']}">{$v['name']}</option>
                            {/if}
                        {else}
                            {if $value['value']==$v['name']}
                            <option value="{$v['name']}" selected>{$v['name']}</option>
                            {else}
                            <option value="{$v['name']}">{$v['name']}</option>
                            {/if}
                        {/if}
                    {else}
                        {if $value['isidtoname']}
                                {if $value['value']==$key}
                                <option value="{$key}" selected>{$v}</option>
                                {else}
                                <option value="{$key}">{$v}</option>
                                {/if}
                        {else}
                                {if $value['value']==$v}
                                <option value="{$v}" selected>{$v}</option>
                                {else}
                                <option value="{$v}">{$v}</option>
                            {/if}
                        {/if}
                    {/if}
                {/foreach}
            </optgroup>
            {/foreach}
        </select>
        <br>
        <span class="red" style="font-size: 10px">{$value['describe']}</span>
    </div>
</div>